﻿@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section TitleContent
{
    @if (!IsSectionDefined("TitleContent"))
    {
        if (Model != null) {@Model.Page.SeoTitle}
    }
    else
    {
        @RenderSection("TitleContent")
    }
}

@section HeadContent
{
    @if (!IsSectionDefined("HeadContent") && Model != null)
    {
    <meta name="keywords" content="@Model.Page.MetaKeywords" />
    <meta name="description" content="@Model.Page.MetaDescription" />
    }
    else
    {
         if (IsSectionDefined("HeadContent")) { @RenderSection("HeadContent")}
    }

    <link rel="stylesheet" href="@Url.Content("~/themes/default/content/bootstrap/css/bootstrap.min.css")" rel="stylesheet" />
    <link rel="stylesheet" href="@Url.Content("~/themes/default/content/bootstrap/css/bootstrap-responsive.min.css")" rel="stylesheet" />
    <link rel="stylesheet" href="@Url.Content("~/themes/default/content/bootstrap/css/bootstrap-fileupload.css")" rel="stylesheet" />
    
    <link rel="stylesheet" href="@Url.Content("~/themes/default/content/font-awesome/css/font-awesome.css")" rel="stylesheet" />
    
    <link rel="stylesheet" href="@Url.Content("~/themes/default/content/style.css")" rel="stylesheet" />
    <link rel="stylesheet" href="@Url.Content("~/themes/default/content/style-responsive.css")" rel="stylesheet" />
    <link rel="stylesheet" href="@Url.Content("~/themes/default/content/style-default.css")" rel="stylesheet" id="style_color" />

    @if (User.Identity.IsAuthenticated && User.IsInRole("Admin"))
    {
        <script type="text/javascript" src="@Url.Content("~/areas/clevercms.admin/scripts/ckeditor/ckeditor.js")"></script>
    }
    }

@{Html.RenderPartial("_HeaderControl");}

<div id="container" class="row-fluid">

    <div class="sidebar-scroll">
        <div id="sidebar" class="nav-collapse collapse">
            <div class="navbar-inverse">
                <form class="navbar-search visible-phone">
                    <input type="text" class="search-query" placeholder="Search" />
                </form>
            </div>
        </div>
    </div>

    <div id="main-content">
        <div class="container-fluid">
            
            <div class="row-fluid">
                <div class="span12">
                    @{Html.RenderAction("CreateMenuItems", "Navigation");}
                    @{Html.RenderPartial("_BreadCrumbControl");}
                </div>
            </div>

            <div class="row-fluid">
                <div class="span12">
                    
                    @Html.Action("FreeHtml", "Tools", new { htmlKey = "Main_Top" })

                    @if (IsSectionDefined("PageContent"))
                    {
                        @RenderSection("PageContent")
                    }

                    @RenderBody()

                </div>
            </div>
        </div>
    </div>
</div>

@{Html.RenderPartial("_FooterControl");}

<script type="text/javascript" src="@Url.Content("~/themes/default/scripts/jquery.nicescroll.js")"></script>
<script type="text/javascript" src="@Url.Content("~/themes/default/content/bootstrap/js/bootstrap.min.js")"></script>
<script type="text/javascript" src="@Url.Content("~/themes/default/scripts/common-scripts.js")"></script>

@if (IsSectionDefined("Bottom"))
{
    @RenderSection("Bottom")
    
    if (User.Identity.IsAuthenticated && User.IsInRole("Admin"))
    {
        <script type="text/javascript">
            CKEDITOR.replace('pageContent',
                {
                    scayt_autoStartup: false,
                    filebrowserBrowseUrl: "@Url.Content("~/scripts/ckfinder/ckfinder.html")",
                    filebrowserImageBrowseUrl: "@Url.Content("~/scripts/ckfinder/ckfinder.html?type=Images")",
                    filebrowserFlashBrowseUrl: "@Url.Content("~/scripts/ckfinder/ckfinder.html?type=Flash")",
                    filebrowserUploadUrl: "@Url.Content("~/scripts/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files")",
                    filebrowserImageUploadUrl: "@Url.Content("~/scripts/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images")",
                    filebrowserFlashUploadUrl: "@Url.Content("~/scripts/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash")",
                    filebrowserWindowWidth: "1000",
                    filebrowserWindowHeight: "700"
                });
        </script> 
        <script type="text/javascript" src="@Url.Content("~/themes/default/scripts/cms/public/menu.js")"></script>
    }
}

@Html.Action("FreeHtml", "Tools", new { htmlKey = "Google_Code" })
@Html.Action("FreeHtml", "Tools", new { htmlKey = "Yandex_Code" })